package com.lagou;

import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Component;
import org.springframework.transaction.PlatformTransactionManager;

import javax.sql.DataSource;


/**
 * @description: Configs
 * @author: cxz
 * @date: 2020/7/20 11:36
 * @version: v1.0
 */
//@Component
public class Configs {
    //@Bean
    public PlatformTransactionManager txManager(DataSource dataSource) {
        return new DataSourceTransactionManager(dataSource);
    }
}
